//
//  Tabbar.swift
//  微博项目
//
//  Created by admin on 16/3/1.
//  Copyright © 2016年 jin. All rights reserved.
//

import UIKit

class Tabbar: NSObject {
    var title:String
    var image:String
    var selectedImage:String
    init(title:String,image:String,selectedImage:String) {
        self.title = title
        self.image = image
        self.selectedImage = selectedImage
    }
    class func instance()->[Tabbar]
    {
        let datas = [["title":"首页","image":"tabbar_home","selectedImage":"tabbar_home_selected"],["title":"消息","image":"tabbar_message_center","selectedImage":"tabbar_message_center_selected"],["title":"发现","image":"tabbar_discover","selectedImage":"tabbar_discover_selected"],["title":"我","image":"tabbar_profile","selectedImage":"tabbar_profile_selected"]]
        var tabbars:[Tabbar] = []
        for var data in datas
        {
            tabbars.append(Tabbar(title: data["title"]!, image: data["image"]!, selectedImage: data["selectedImage"]!))
        }
        return tabbars
    }
}
